﻿<UserControl x:Class="LightingPlatform.View.LightingNavigation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:vm="clr-namespace:LightingPlatform.ViewModel;assembly=LightingPlatform.ViewModel"
    d:DesignHeight="300" d:DesignWidth="400">
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"  BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" TabNavigation="Once" Padding="0" Margin="0">
        <Grid x:Name="LayoutRoot" Background="White">
            <Grid.Resources>
                <vm:PictureConverter x:Key="PictureConverter"/>
                <!-- DataTemplate for Photograph instances -->
                <DataTemplate x:Key="PhotographTemplate">
                    <Grid Margin="6">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="20" />
                        </Grid.RowDefinitions>
                        <Viewbox Height="150" Width="150" VerticalAlignment="Bottom">
                            <Image Source="{Binding PictureUri}"/>
                        </Viewbox>

                        <TextBlock Grid.Row="1" Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="13"/>

                    </Grid>
                </DataTemplate>
            </Grid.Resources>
            <ListBox x:Name="Pictures" Width="980"
                  Style="{StaticResource WrapListBox}"
                  ItemTemplate="{StaticResource PhotographTemplate}"
                  Margin="4" />
        </Grid>
    </ScrollViewer>
</UserControl>
